<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>
<%@ include file="/commons/commonList.jsp" %>
<html>
<head>
<script type="text/javascript" src="${ctx }/scripts/div/common.js"></script>
<script type="text/javascript" src="${ctx }/scripts/common.js"></script>

<script type="text/javascript">
  //创建一个人员对象
  var assessor = function(type,id,name,roleId,roleCode,roleName){
    this.type = type;
    this.id = id;
    this.name = name;
    this.title = title;
  }
  assessor.type = "${type}";
 //保存选中的审批人信息
 function setAssessorId(id,name){
    assessor.id = id;
    assessor.name = name;
 }

 /**
  * 功能描述：调用父类窗体的方法，把选择的人员信息显示在父窗体中
  */
 function setParentInfo(){
 	//判断是否选择了审批人
 	if(assessor.name == "" || assessor.name == null ){
 		Alert("${key.chooseAuditingPerson}");
 		return ;
 	}

    var parentFrameId = "${parentFrameId}";
    if(assessor.id == null || assessor.id == ""){
    }else{
   		 if(parentFrameId != null && parentFrameId != ""){
		 	var parent = findFrame(parentFrameId);
			if(parent != undefined){
		  	  parent.setAssessorInfo(assessor);
			}

      	}
    }
    windowClose();
 }

 /**
  * 功能描述: 根据姓名查询审批人信息
  */
  function searchAssessor(){
	var isTrue = document.getElementById("saarchAssessorForm").fireEvent("onBlur");
      if(isTrue){
      	document.getElementById("saarchAssessorForm").submit();
      }
  }
</script>
</head>

<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr><td><img src="${ctx }/images/ico_Advance.gif" width="16" height="16" align="absmiddle"> <span class="window_head_intext">${key.personChoose }</span></td></tr>
    </table></td>
  </tr>
  <tr><td class="aux_header_line_1"></td></tr>
  <tr><td class="aux_header_line_2"></td></tr>
  <tr>
    <td class="content"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
        <td bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="0">
 <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#BCBFD2" >
  <tr>
    <td>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="bg_search"><table border="0" cellpadding="0" cellspacing="1">
      <tr>

<form name="saarchAssessorForm" id="saarchAssessorForm" method="post" action="${ctx}/house_proRightModificationAction.do?method=assessorList" >
		<input type="hidden" name="parentFrameId" value="${parentFrameId}" />
		<input type="hidden" name="type" value="${type }" />
      	<td>&nbsp;&nbsp;${key.userName }：</td>
      	<td class="td_search"><input name="assessorName" id="assessorName" type="text" class="inputtext" size="16" value="${name }"></td>
      	<td class="td_search"><table border="0" cellpadding="0" cellspacing="0" >
                      <tr>
                        <td class="buttonOffLeft" id="btn1_111"></td>
                        <td class="buttonOffMiddle" id="btn1_112" onblur="btn_change(11)" onclick="searchAssessor();" onMouseOver="btn_change_over(11)" onMouseOut="btn_change_out(11)">
                        	<img src="${ctx }/images/ico_searchico.gif" alt="" border="0" align="absmiddle" />${key.query }</td>
                        <td class="buttonOffRight" id="btn1_113"></td>
                      </tr>
                  </table></td>
		 <td class="td_search">&nbsp;</td>
</form>

      </tr>
    </table></td>
  </tr>
  <tr>
  <td valign="top">

 <div  class="tab_bgline" >
	<ec:ceTable items="userList"
		action="${ctx}/house_proRightModificationAction.do?method=assessorList&parentFrameId=goOutAddWinIfm"
		var="userItem"
		view="pmsview"
		width="100%"
		styleClass="gridData2"
		rowsDisplayed="5" >
	<ec:ceRow styleClass="grid" onclick="setAssessorId('${userItem.userId}','${userItem.userName }');">
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.userName }" property="userName"  />
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.station }" property="station" />
	</ec:ceRow>
		<ec:parameter name="name" value="${name}"></ec:parameter>
		<ec:parameter name="type" value="${type}"></ec:parameter>
</ec:ceTable>
</div>

</td>
    </tr>

</table>
</tr>
  </table>

          </td>
	  </tr>
    </table></td>
  </tr>
  <tr>
    <td class="window_footer"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_21"></td>
              <td class="buttonOffMiddle" id="btn1_22" onClick="setParentInfo();" onMouseOver="btn_change_over(2)" onMouseOut="btn_change_out(2)" onblur="btn_change(2)"><img src="${ctx }/images/ico_ok.gif" alt="" width="14" height="14" border="0" align="absbottom"> ${key.confirm }</td>
              <td class="buttonOffRight" id="btn1_23"></td>
            </tr>
        </table></td>
        <td class="btn_between_space"></td>
        <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
              <td class="buttonOffMiddle" id="btn1_32" onClick="windowClose();" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)" onblur="btn_change(3)"><img src="${ctx }/images/ico_cancel.gif" alt="" width="14" height="14" border="0" align="absbottom">${key.cancel }</td>
              <td class="buttonOffRight" id="btn1_33"></td>
            </tr>
        </table></td>
      </tr>
    </table>
    <p>&nbsp;</p></td>
  </tr>
</table>
</body>
</html>